<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\date\DatePicker;

/* @var $this yii\web\View */
/* @var $model app\models\FamilymemberModel */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="familymember-model-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'stu_id')->hiddenInput(['maxlength' => true,
    		'value'=>$fid,
    		'readOnly'=>true,
    ])->label('') ?>

    <?= $form->field($model, 'relate')->textInput(['maxlength' => true])->label('关系（如父亲、母亲等）') ?>

    <?= $form->field($model, 'name')->textInput(['maxlength' => true])->label('姓名') ?>

    <?= $form->field($model, 'date_of_birth')->widget(DatePicker::classname(), [
        'options' => ['placeholder' => 'Enter birth date ...'],
        'pluginOptions' => [
            'autoclose'=>true,
            'format' => 'yyyy.mm.dd'
        ]
    ])->label('出生日期');  ?>

    <?= $form->field($model, 'workplace')->textInput(['maxlength' => true])->label('工作单位') ?>

    <?= $form->field($model, 'duties')->textInput(['maxlength' => true])->label('职务') ?>

    <?= $form->field($model, 'telephone')->textInput(['maxlength' => true])->label('联系电话（11位数字）') ?>

    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '添加' : '更新', ['class' => $model->isNewRecord ? 'btn btn-info' : 'btn btn-info']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
